<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'showAssignRight.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" href="<%=path%>/dtree/dtree.css" type="text/css"></link>
  	<script type="text/javascript" src="<%=path%>/dtree/dtree.js"></script>

 <script type="text/javascript">
	var d = new dTree("d");
	
	window.onload = function(){
		d.add("ROOT_MENU","-1","OA管理系统");
	
		<c:forEach items="${rightsList}" var="right">
		d.add('${right.rightCode}','${right.rightParentCode}','${right.rightText}','','${right.rightTip}','','','','',${right.isChecked});
		</c:forEach>
		document.getElementById("mainDiv").innerHTML = d;
	}
</script>

	


  </head>
  
  <body>
  	<s:form action="roleRight_doAssignRight">
  	<s:hidden name="roleId" value="%{roleId}"></s:hidden>
    <div id="mainDiv">
    	
    </div>
    
    <s:submit value="分配"></s:submit>
   </s:form>
  </body>
</html>
